/*
 * This file is part of quickLoad, a software for gamers
 *
 * Copyright (C) 2005-2008 Lucas Romero
 *
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using QuickLoad.UI;

namespace QuickLoad
{
	/// <summary>
	/// Zusammenfassung fr Settings.
	/// </summary>
	public class Settings : System.Windows.Forms.Form
    {
        private System.Windows.Forms.Label lMaxRetries;
        internal System.Windows.Forms.GroupBox gUploadSettings;
        internal System.Windows.Forms.Button bOK;
		internal System.Windows.Forms.Button bCancel;
		private System.Windows.Forms.Label lMaxConnections;
        private System.Windows.Forms.Label lMaxPreloads;
        private ListBox lBoxFolders;
        private Button bAddFolder;
        private Button bRemoveFolder;
        private NumericUpDown ReplayCount;
        private FolderBrowserDialog fBrowser;
        private GroupBox gRecentFiles;
        private Label lFolderDesc;
        private NumericUpDown nUpMaxPreloads;
        private NumericUpDown nUpMaxConnections;
        private NumericUpDown nUpMaxRetries;
        private Label lRepCount;
        private NumericUpDown AequitasCount;
        private Label lAeqCount;
        private NumericUpDown ScreenshotCount;
        private Label lScreenCount;
        private Label lChangesHint;
        private GroupBox grpMisc;
        private System.ComponentModel.IContainer components;
        private XPExplorerBar.Expando xp;
        private XPExplorerBar.TaskPane tp;
        private Button bAutoScan;
        private GroupBox gEnabledElements;
        private TreeView twEnabledItems;
        private ImageList imageList1;
        private TabControl tabControl1;
        private TabPage tabFilesnFolders;
        private TabPage tabApperance;
        private TabPage tabAdditional;
        private TabPage tabUploading;
        private NumericUpDown nToolTipTimeout;
        private Label lToolTipTimeout;
        private Label lRecentFilesHeight;
        private NumericUpDown RecentFilesHeight;
        private CheckBox cbMenuBarEnabled;
        private CheckBox cbShowSplash;
        private GroupBox gbDemoNames;
        private Button bDemoNameRemove;
        private ListBox lbDemoNames;
        private Button bDemoNameAdd;
        private GroupBox gbAequitasNames;
        private ListBox lbAequitasNames;
        private GroupBox gbScreenshotNames;
        private ListBox lbScreenshotNames;
        private TextBox tbDemoNames;
        private TextBox tbAequitasName;
        private Button bAequitasNameRemove;
        private Button bAequitasNameAdd;
        private TextBox tbScreenshotNames;
        private Button bScreenshotNameRemove;
        private Button bScreenshotNameAdd;
        private Label lChangesHint2;
        private GroupBox gAutoUpdate;
        private CheckBox cbAutoUpdate;
        private Button bUpdateCheckNow;
        private Button bAequitasNameUp;
        private Button bAequitasNameDown;
        private Button bScreenshotNameUp;
        private Button bScreenshotNameDown;
        private Button bReplayNameUp;
        private Button bReplayNameDown;
        private FormMain parent;

        public Settings(FormMain parent,XPExplorerBar.Expando xp, XPExplorerBar.TaskPane tp)
		{
			//
			// Erforderlich fr die Windows Form-Designeruntersttzung
			//
			InitializeComponent();
            this.xp = xp;
            this.tp = tp;
            this.parent = parent;
			//
			// TODO: Fgen Sie den Konstruktorcode nach dem Aufruf von InitializeComponent hinzu
			//
		}

		/// <summary>
		/// Die verwendeten Ressourcen bereinigen.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Vom Windows Form-Designer generierter Code
		/// <summary>
		/// Erforderliche Methode fr die Designeruntersttzung. 
		/// Der Inhalt der Methode darf nicht mit dem Code-Editor gendert werden.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Settings));
            this.lMaxRetries = new System.Windows.Forms.Label();
            this.gUploadSettings = new System.Windows.Forms.GroupBox();
            this.lChangesHint2 = new System.Windows.Forms.Label();
            this.nUpMaxPreloads = new System.Windows.Forms.NumericUpDown();
            this.nUpMaxConnections = new System.Windows.Forms.NumericUpDown();
            this.nUpMaxRetries = new System.Windows.Forms.NumericUpDown();
            this.lMaxPreloads = new System.Windows.Forms.Label();
            this.lMaxConnections = new System.Windows.Forms.Label();
            this.lBoxFolders = new System.Windows.Forms.ListBox();
            this.ReplayCount = new System.Windows.Forms.NumericUpDown();
            this.fBrowser = new System.Windows.Forms.FolderBrowserDialog();
            this.gRecentFiles = new System.Windows.Forms.GroupBox();
            this.bAutoScan = new System.Windows.Forms.Button();
            this.lChangesHint = new System.Windows.Forms.Label();
            this.AequitasCount = new System.Windows.Forms.NumericUpDown();
            this.lAeqCount = new System.Windows.Forms.Label();
            this.ScreenshotCount = new System.Windows.Forms.NumericUpDown();
            this.lScreenCount = new System.Windows.Forms.Label();
            this.lRepCount = new System.Windows.Forms.Label();
            this.lFolderDesc = new System.Windows.Forms.Label();
            this.bAddFolder = new System.Windows.Forms.Button();
            this.bRemoveFolder = new System.Windows.Forms.Button();
            this.grpMisc = new System.Windows.Forms.GroupBox();
            this.nToolTipTimeout = new System.Windows.Forms.NumericUpDown();
            this.lToolTipTimeout = new System.Windows.Forms.Label();
            this.lRecentFilesHeight = new System.Windows.Forms.Label();
            this.RecentFilesHeight = new System.Windows.Forms.NumericUpDown();
            this.cbMenuBarEnabled = new System.Windows.Forms.CheckBox();
            this.cbShowSplash = new System.Windows.Forms.CheckBox();
            this.gEnabledElements = new System.Windows.Forms.GroupBox();
            this.twEnabledItems = new System.Windows.Forms.TreeView();
            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tabApperance = new System.Windows.Forms.TabPage();
            this.tabFilesnFolders = new System.Windows.Forms.TabPage();
            this.tabUploading = new System.Windows.Forms.TabPage();
            this.tabAdditional = new System.Windows.Forms.TabPage();
            this.gAutoUpdate = new System.Windows.Forms.GroupBox();
            this.bUpdateCheckNow = new System.Windows.Forms.Button();
            this.cbAutoUpdate = new System.Windows.Forms.CheckBox();
            this.gbAequitasNames = new System.Windows.Forms.GroupBox();
            this.tbAequitasName = new System.Windows.Forms.TextBox();
            this.bAequitasNameRemove = new System.Windows.Forms.Button();
            this.bAequitasNameAdd = new System.Windows.Forms.Button();
            this.lbAequitasNames = new System.Windows.Forms.ListBox();
            this.gbScreenshotNames = new System.Windows.Forms.GroupBox();
            this.tbScreenshotNames = new System.Windows.Forms.TextBox();
            this.bScreenshotNameRemove = new System.Windows.Forms.Button();
            this.bScreenshotNameAdd = new System.Windows.Forms.Button();
            this.lbScreenshotNames = new System.Windows.Forms.ListBox();
            this.gbDemoNames = new System.Windows.Forms.GroupBox();
            this.tbDemoNames = new System.Windows.Forms.TextBox();
            this.bDemoNameRemove = new System.Windows.Forms.Button();
            this.lbDemoNames = new System.Windows.Forms.ListBox();
            this.bDemoNameAdd = new System.Windows.Forms.Button();
            this.bCancel = new System.Windows.Forms.Button();
            this.bOK = new System.Windows.Forms.Button();
            this.bAequitasNameDown = new System.Windows.Forms.Button();
            this.bAequitasNameUp = new System.Windows.Forms.Button();
            this.bReplayNameUp = new System.Windows.Forms.Button();
            this.bReplayNameDown = new System.Windows.Forms.Button();
            this.bScreenshotNameUp = new System.Windows.Forms.Button();
            this.bScreenshotNameDown = new System.Windows.Forms.Button();
            this.gUploadSettings.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxPreloads)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxConnections)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxRetries)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ReplayCount)).BeginInit();
            this.gRecentFiles.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.AequitasCount)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ScreenshotCount)).BeginInit();
            this.grpMisc.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.nToolTipTimeout)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.RecentFilesHeight)).BeginInit();
            this.gEnabledElements.SuspendLayout();
            this.tabControl1.SuspendLayout();
            this.tabApperance.SuspendLayout();
            this.tabFilesnFolders.SuspendLayout();
            this.tabUploading.SuspendLayout();
            this.tabAdditional.SuspendLayout();
            this.gAutoUpdate.SuspendLayout();
            this.gbAequitasNames.SuspendLayout();
            this.gbScreenshotNames.SuspendLayout();
            this.gbDemoNames.SuspendLayout();
            this.SuspendLayout();
            // 
            // lMaxRetries
            // 
            this.lMaxRetries.Location = new System.Drawing.Point(8, 16);
            this.lMaxRetries.Name = "lMaxRetries";
            this.lMaxRetries.Size = new System.Drawing.Size(167, 26);
            this.lMaxRetries.TabIndex = 0;
            this.lMaxRetries.Text = "Number of times the upload is retried if it fails";
            // 
            // gUploadSettings
            // 
            this.gUploadSettings.Controls.Add(this.lChangesHint2);
            this.gUploadSettings.Controls.Add(this.nUpMaxPreloads);
            this.gUploadSettings.Controls.Add(this.nUpMaxConnections);
            this.gUploadSettings.Controls.Add(this.nUpMaxRetries);
            this.gUploadSettings.Controls.Add(this.lMaxPreloads);
            this.gUploadSettings.Controls.Add(this.lMaxConnections);
            this.gUploadSettings.Controls.Add(this.lMaxRetries);
            this.gUploadSettings.Location = new System.Drawing.Point(3, 3);
            this.gUploadSettings.Name = "gUploadSettings";
            this.gUploadSettings.Size = new System.Drawing.Size(336, 165);
            this.gUploadSettings.TabIndex = 3;
            this.gUploadSettings.TabStop = false;
            this.gUploadSettings.Text = "Upload Settings";
            // 
            // lChangesHint2
            // 
            this.lChangesHint2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.lChangesHint2.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lChangesHint2.Location = new System.Drawing.Point(233, 16);
            this.lChangesHint2.Name = "lChangesHint2";
            this.lChangesHint2.Size = new System.Drawing.Size(97, 138);
            this.lChangesHint2.TabIndex = 19;
            this.lChangesHint2.Text = "Changes will take effect when starting the upload process";
            this.lChangesHint2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // nUpMaxPreloads
            // 
            this.nUpMaxPreloads.Location = new System.Drawing.Point(171, 100);
            this.nUpMaxPreloads.Maximum = new decimal(new int[] {
            5,
            0,
            0,
            0});
            this.nUpMaxPreloads.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.nUpMaxPreloads.Name = "nUpMaxPreloads";
            this.nUpMaxPreloads.Size = new System.Drawing.Size(39, 20);
            this.nUpMaxPreloads.TabIndex = 12;
            this.nUpMaxPreloads.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
            // 
            // nUpMaxConnections
            // 
            this.nUpMaxConnections.Location = new System.Drawing.Point(171, 51);
            this.nUpMaxConnections.Maximum = new decimal(new int[] {
            2,
            0,
            0,
            0});
            this.nUpMaxConnections.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.nUpMaxConnections.Name = "nUpMaxConnections";
            this.nUpMaxConnections.Size = new System.Drawing.Size(39, 20);
            this.nUpMaxConnections.TabIndex = 11;
            this.nUpMaxConnections.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
            // 
            // nUpMaxRetries
            // 
            this.nUpMaxRetries.Location = new System.Drawing.Point(171, 16);
            this.nUpMaxRetries.Maximum = new decimal(new int[] {
            3,
            0,
            0,
            0});
            this.nUpMaxRetries.Name = "nUpMaxRetries";
            this.nUpMaxRetries.Size = new System.Drawing.Size(39, 20);
            this.nUpMaxRetries.TabIndex = 10;
            // 
            // lMaxPreloads
            // 
            this.lMaxPreloads.Location = new System.Drawing.Point(8, 100);
            this.lMaxPreloads.Name = "lMaxPreloads";
            this.lMaxPreloads.Size = new System.Drawing.Size(144, 54);
            this.lMaxPreloads.TabIndex = 9;
            this.lMaxPreloads.Text = "How many files should be compressed in the background at the same time? (standard" +
                ": 1)";
            // 
            // lMaxConnections
            // 
            this.lMaxConnections.Location = new System.Drawing.Point(8, 51);
            this.lMaxConnections.Name = "lMaxConnections";
            this.lMaxConnections.Size = new System.Drawing.Size(167, 49);
            this.lMaxConnections.TabIndex = 8;
            this.lMaxConnections.Text = "How many FTP-Connections should be used for uploading? (standard: 2)";
            // 
            // lBoxFolders
            // 
            this.lBoxFolders.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lBoxFolders.FormattingEnabled = true;
            this.lBoxFolders.HorizontalScrollbar = true;
            this.lBoxFolders.Location = new System.Drawing.Point(4, 62);
            this.lBoxFolders.Name = "lBoxFolders";
            this.lBoxFolders.Size = new System.Drawing.Size(345, 173);
            this.lBoxFolders.TabIndex = 8;
            // 
            // ReplayCount
            // 
            this.ReplayCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.ReplayCount.Location = new System.Drawing.Point(157, 258);
            this.ReplayCount.Name = "ReplayCount";
            this.ReplayCount.Size = new System.Drawing.Size(46, 20);
            this.ReplayCount.TabIndex = 12;
            // 
            // gRecentFiles
            // 
            this.gRecentFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gRecentFiles.Controls.Add(this.bAutoScan);
            this.gRecentFiles.Controls.Add(this.lChangesHint);
            this.gRecentFiles.Controls.Add(this.AequitasCount);
            this.gRecentFiles.Controls.Add(this.lAeqCount);
            this.gRecentFiles.Controls.Add(this.ScreenshotCount);
            this.gRecentFiles.Controls.Add(this.lScreenCount);
            this.gRecentFiles.Controls.Add(this.lRepCount);
            this.gRecentFiles.Controls.Add(this.lFolderDesc);
            this.gRecentFiles.Controls.Add(this.ReplayCount);
            this.gRecentFiles.Controls.Add(this.lBoxFolders);
            this.gRecentFiles.Controls.Add(this.bAddFolder);
            this.gRecentFiles.Controls.Add(this.bRemoveFolder);
            this.gRecentFiles.Location = new System.Drawing.Point(6, 6);
            this.gRecentFiles.Name = "gRecentFiles";
            this.gRecentFiles.Size = new System.Drawing.Size(457, 376);
            this.gRecentFiles.TabIndex = 13;
            this.gRecentFiles.TabStop = false;
            this.gRecentFiles.Text = "Recent files";
            // 
            // bAutoScan
            // 
            this.bAutoScan.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.bAutoScan.Enabled = false;
            this.bAutoScan.Image = global::QuickLoad.Images.Wizard_16;
            this.bAutoScan.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bAutoScan.Location = new System.Drawing.Point(355, 163);
            this.bAutoScan.Name = "bAutoScan";
            this.bAutoScan.Size = new System.Drawing.Size(96, 23);
            this.bAutoScan.TabIndex = 19;
            this.bAutoScan.Text = "Auto-Scan";
            this.bAutoScan.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.bAutoScan.UseVisualStyleBackColor = true;
            // 
            // lChangesHint
            // 
            this.lChangesHint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.lChangesHint.ForeColor = System.Drawing.SystemColors.ControlText;
            this.lChangesHint.Location = new System.Drawing.Point(371, 278);
            this.lChangesHint.Name = "lChangesHint";
            this.lChangesHint.Size = new System.Drawing.Size(80, 93);
            this.lChangesHint.TabIndex = 18;
            this.lChangesHint.Text = "Changes will take effect after refreshing the \"recent file\" list";
            this.lChangesHint.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
            // 
            // AequitasCount
            // 
            this.AequitasCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.AequitasCount.Location = new System.Drawing.Point(157, 318);
            this.AequitasCount.Name = "AequitasCount";
            this.AequitasCount.Size = new System.Drawing.Size(46, 20);
            this.AequitasCount.TabIndex = 17;
            // 
            // lAeqCount
            // 
            this.lAeqCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lAeqCount.Location = new System.Drawing.Point(5, 320);
            this.lAeqCount.Name = "lAeqCount";
            this.lAeqCount.Size = new System.Drawing.Size(146, 51);
            this.lAeqCount.TabIndex = 16;
            this.lAeqCount.Text = "Number of Aequitas-files that should be shown";
            // 
            // ScreenshotCount
            // 
            this.ScreenshotCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.ScreenshotCount.Location = new System.Drawing.Point(157, 287);
            this.ScreenshotCount.Name = "ScreenshotCount";
            this.ScreenshotCount.Size = new System.Drawing.Size(46, 20);
            this.ScreenshotCount.TabIndex = 15;
            // 
            // lScreenCount
            // 
            this.lScreenCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lScreenCount.Location = new System.Drawing.Point(5, 289);
            this.lScreenCount.Name = "lScreenCount";
            this.lScreenCount.Size = new System.Drawing.Size(146, 31);
            this.lScreenCount.TabIndex = 14;
            this.lScreenCount.Text = "Number of screenshots that should be shown";
            // 
            // lRepCount
            // 
            this.lRepCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.lRepCount.Location = new System.Drawing.Point(6, 258);
            this.lRepCount.Name = "lRepCount";
            this.lRepCount.Size = new System.Drawing.Size(146, 31);
            this.lRepCount.TabIndex = 13;
            this.lRepCount.Text = "Number of replays that should be shown";
            // 
            // lFolderDesc
            // 
            this.lFolderDesc.Location = new System.Drawing.Point(8, 16);
            this.lFolderDesc.Name = "lFolderDesc";
            this.lFolderDesc.Size = new System.Drawing.Size(274, 43);
            this.lFolderDesc.TabIndex = 11;
            this.lFolderDesc.Text = "Folders which should be scanned for matchmedia to upload (e.g. cstrike-folder or " +
                "aequitas/archive)";
            // 
            // bAddFolder
            // 
            this.bAddFolder.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.bAddFolder.Image = global::QuickLoad.Images.Open_16;
            this.bAddFolder.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bAddFolder.Location = new System.Drawing.Point(355, 105);
            this.bAddFolder.Name = "bAddFolder";
            this.bAddFolder.Size = new System.Drawing.Size(96, 23);
            this.bAddFolder.TabIndex = 9;
            this.bAddFolder.Text = "Add Folder";
            this.bAddFolder.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.bAddFolder.UseVisualStyleBackColor = true;
            this.bAddFolder.Click += new System.EventHandler(this.bAddFolder_Click);
            // 
            // bRemoveFolder
            // 
            this.bRemoveFolder.Anchor = System.Windows.Forms.AnchorStyles.Right;
            this.bRemoveFolder.Image = global::QuickLoad.Images.Close_16;
            this.bRemoveFolder.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bRemoveFolder.Location = new System.Drawing.Point(355, 134);
            this.bRemoveFolder.Name = "bRemoveFolder";
            this.bRemoveFolder.Size = new System.Drawing.Size(96, 23);
            this.bRemoveFolder.TabIndex = 10;
            this.bRemoveFolder.Text = "Rem. Folder";
            this.bRemoveFolder.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            this.bRemoveFolder.UseVisualStyleBackColor = true;
            this.bRemoveFolder.Click += new System.EventHandler(this.bRemoveFolder_Click);
            // 
            // grpMisc
            // 
            this.grpMisc.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.grpMisc.Controls.Add(this.nToolTipTimeout);
            this.grpMisc.Controls.Add(this.lToolTipTimeout);
            this.grpMisc.Controls.Add(this.lRecentFilesHeight);
            this.grpMisc.Controls.Add(this.RecentFilesHeight);
            this.grpMisc.Controls.Add(this.cbMenuBarEnabled);
            this.grpMisc.Controls.Add(this.cbShowSplash);
            this.grpMisc.Location = new System.Drawing.Point(7, 6);
            this.grpMisc.Name = "grpMisc";
            this.grpMisc.Size = new System.Drawing.Size(456, 104);
            this.grpMisc.TabIndex = 14;
            this.grpMisc.TabStop = false;
            this.grpMisc.Text = "Miscellaneous";
            // 
            // nToolTipTimeout
            // 
            this.nToolTipTimeout.Location = new System.Drawing.Point(223, 108);
            this.nToolTipTimeout.Maximum = new decimal(new int[] {
            60000,
            0,
            0,
            0});
            this.nToolTipTimeout.Name = "nToolTipTimeout";
            this.nToolTipTimeout.Size = new System.Drawing.Size(70, 20);
            this.nToolTipTimeout.TabIndex = 31;
            this.nToolTipTimeout.ThousandsSeparator = true;
            // 
            // lToolTipTimeout
            // 
            this.lToolTipTimeout.Location = new System.Drawing.Point(12, 110);
            this.lToolTipTimeout.Name = "lToolTipTimeout";
            this.lToolTipTimeout.Size = new System.Drawing.Size(174, 13);
            this.lToolTipTimeout.TabIndex = 30;
            this.lToolTipTimeout.Text = "ToolTip-Timeout (in ms):";
            // 
            // lRecentFilesHeight
            // 
            this.lRecentFilesHeight.AutoSize = true;
            this.lRecentFilesHeight.Location = new System.Drawing.Point(12, 16);
            this.lRecentFilesHeight.Name = "lRecentFilesHeight";
            this.lRecentFilesHeight.Size = new System.Drawing.Size(117, 13);
            this.lRecentFilesHeight.TabIndex = 24;
            this.lRecentFilesHeight.Text = "Height of recent-file-list:";
            // 
            // RecentFilesHeight
            // 
            this.RecentFilesHeight.Location = new System.Drawing.Point(246, 14);
            this.RecentFilesHeight.Maximum = new decimal(new int[] {
            800,
            0,
            0,
            0});
            this.RecentFilesHeight.Name = "RecentFilesHeight";
            this.RecentFilesHeight.Size = new System.Drawing.Size(47, 20);
            this.RecentFilesHeight.TabIndex = 25;
            // 
            // cbMenuBarEnabled
            // 
            this.cbMenuBarEnabled.Location = new System.Drawing.Point(16, 35);
            this.cbMenuBarEnabled.Name = "cbMenuBarEnabled";
            this.cbMenuBarEnabled.Size = new System.Drawing.Size(277, 17);
            this.cbMenuBarEnabled.TabIndex = 26;
            this.cbMenuBarEnabled.Text = "Show XP-Style menubar on the left";
            this.cbMenuBarEnabled.UseVisualStyleBackColor = true;
            // 
            // cbShowSplash
            // 
            this.cbShowSplash.Location = new System.Drawing.Point(16, 57);
            this.cbShowSplash.Name = "cbShowSplash";
            this.cbShowSplash.Size = new System.Drawing.Size(277, 17);
            this.cbShowSplash.TabIndex = 27;
            this.cbShowSplash.Text = "show splash-screen on startup";
            this.cbShowSplash.UseVisualStyleBackColor = true;
            // 
            // gEnabledElements
            // 
            this.gEnabledElements.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.gEnabledElements.Controls.Add(this.twEnabledItems);
            this.gEnabledElements.Location = new System.Drawing.Point(7, 116);
            this.gEnabledElements.Name = "gEnabledElements";
            this.gEnabledElements.Size = new System.Drawing.Size(456, 266);
            this.gEnabledElements.TabIndex = 15;
            this.gEnabledElements.TabStop = false;
            this.gEnabledElements.Text = "Elements shown in sidebar";
            // 
            // twEnabledItems
            // 
            this.twEnabledItems.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.twEnabledItems.CheckBoxes = true;
            this.twEnabledItems.HideSelection = false;
            this.twEnabledItems.Location = new System.Drawing.Point(6, 19);
            this.twEnabledItems.Name = "twEnabledItems";
            this.twEnabledItems.ShowLines = false;
            this.twEnabledItems.ShowRootLines = false;
            this.twEnabledItems.Size = new System.Drawing.Size(444, 241);
            this.twEnabledItems.TabIndex = 0;
            // 
            // imageList1
            // 
            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
            this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
            this.imageList1.Images.SetKeyName(0, "Screwdriver_16.ico");
            this.imageList1.Images.SetKeyName(1, "Application_16.ico");
            this.imageList1.Images.SetKeyName(2, "wupload.ico");
            this.imageList1.Images.SetKeyName(3, "Open_16.ico");
            // 
            // tabControl1
            // 
            this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.tabControl1.Controls.Add(this.tabApperance);
            this.tabControl1.Controls.Add(this.tabFilesnFolders);
            this.tabControl1.Controls.Add(this.tabUploading);
            this.tabControl1.Controls.Add(this.tabAdditional);
            this.tabControl1.ImageList = this.imageList1;
            this.tabControl1.Location = new System.Drawing.Point(1, 2);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new System.Drawing.Size(477, 415);
            this.tabControl1.TabIndex = 16;
            // 
            // tabApperance
            // 
            this.tabApperance.Controls.Add(this.gEnabledElements);
            this.tabApperance.Controls.Add(this.grpMisc);
            this.tabApperance.ImageIndex = 1;
            this.tabApperance.Location = new System.Drawing.Point(4, 23);
            this.tabApperance.Name = "tabApperance";
            this.tabApperance.Padding = new System.Windows.Forms.Padding(3);
            this.tabApperance.Size = new System.Drawing.Size(469, 388);
            this.tabApperance.TabIndex = 1;
            this.tabApperance.Text = "Appearance";
            this.tabApperance.UseVisualStyleBackColor = true;
            // 
            // tabFilesnFolders
            // 
            this.tabFilesnFolders.Controls.Add(this.gRecentFiles);
            this.tabFilesnFolders.ImageIndex = 3;
            this.tabFilesnFolders.Location = new System.Drawing.Point(4, 23);
            this.tabFilesnFolders.Name = "tabFilesnFolders";
            this.tabFilesnFolders.Padding = new System.Windows.Forms.Padding(3);
            this.tabFilesnFolders.Size = new System.Drawing.Size(469, 388);
            this.tabFilesnFolders.TabIndex = 0;
            this.tabFilesnFolders.Text = "Files & Folders";
            this.tabFilesnFolders.UseVisualStyleBackColor = true;
            // 
            // tabUploading
            // 
            this.tabUploading.Controls.Add(this.gUploadSettings);
            this.tabUploading.ImageIndex = 2;
            this.tabUploading.Location = new System.Drawing.Point(4, 23);
            this.tabUploading.Name = "tabUploading";
            this.tabUploading.Size = new System.Drawing.Size(469, 388);
            this.tabUploading.TabIndex = 3;
            this.tabUploading.Text = "Uploader preferences";
            this.tabUploading.UseVisualStyleBackColor = true;
            // 
            // tabAdditional
            // 
            this.tabAdditional.Controls.Add(this.gAutoUpdate);
            this.tabAdditional.Controls.Add(this.gbAequitasNames);
            this.tabAdditional.Controls.Add(this.gbScreenshotNames);
            this.tabAdditional.Controls.Add(this.gbDemoNames);
            this.tabAdditional.ImageIndex = 0;
            this.tabAdditional.Location = new System.Drawing.Point(4, 23);
            this.tabAdditional.Name = "tabAdditional";
            this.tabAdditional.Size = new System.Drawing.Size(469, 388);
            this.tabAdditional.TabIndex = 2;
            this.tabAdditional.Text = "Additional settings";
            this.tabAdditional.UseVisualStyleBackColor = true;
            // 
            // gAutoUpdate
            // 
            this.gAutoUpdate.Controls.Add(this.bUpdateCheckNow);
            this.gAutoUpdate.Controls.Add(this.cbAutoUpdate);
            this.gAutoUpdate.Location = new System.Drawing.Point(238, 199);
            this.gAutoUpdate.Name = "gAutoUpdate";
            this.gAutoUpdate.Size = new System.Drawing.Size(225, 180);
            this.gAutoUpdate.TabIndex = 4;
            this.gAutoUpdate.TabStop = false;
            this.gAutoUpdate.Text = "Automatic updates";
            // 
            // bUpdateCheckNow
            // 
            this.bUpdateCheckNow.Image = global::QuickLoad.Images.UpdateInstaller_16;
            this.bUpdateCheckNow.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bUpdateCheckNow.Location = new System.Drawing.Point(101, 151);
            this.bUpdateCheckNow.Name = "bUpdateCheckNow";
            this.bUpdateCheckNow.Size = new System.Drawing.Size(118, 23);
            this.bUpdateCheckNow.TabIndex = 1;
            this.bUpdateCheckNow.Text = "Check now!";
            this.bUpdateCheckNow.UseVisualStyleBackColor = true;
            this.bUpdateCheckNow.Click += new System.EventHandler(this.bUpdateCheckNow_Click);
            // 
            // cbAutoUpdate
            // 
            this.cbAutoUpdate.CheckAlign = System.Drawing.ContentAlignment.TopLeft;
            this.cbAutoUpdate.Location = new System.Drawing.Point(6, 19);
            this.cbAutoUpdate.Name = "cbAutoUpdate";
            this.cbAutoUpdate.Size = new System.Drawing.Size(213, 30);
            this.cbAutoUpdate.TabIndex = 0;
            this.cbAutoUpdate.Text = "Check for updates once a day";
            this.cbAutoUpdate.TextAlign = System.Drawing.ContentAlignment.TopLeft;
            this.cbAutoUpdate.UseVisualStyleBackColor = true;
            // 
            // gbAequitasNames
            // 
            this.gbAequitasNames.Controls.Add(this.bAequitasNameUp);
            this.gbAequitasNames.Controls.Add(this.bAequitasNameDown);
            this.gbAequitasNames.Controls.Add(this.tbAequitasName);
            this.gbAequitasNames.Controls.Add(this.bAequitasNameRemove);
            this.gbAequitasNames.Controls.Add(this.bAequitasNameAdd);
            this.gbAequitasNames.Controls.Add(this.lbAequitasNames);
            this.gbAequitasNames.Location = new System.Drawing.Point(7, 199);
            this.gbAequitasNames.Name = "gbAequitasNames";
            this.gbAequitasNames.Size = new System.Drawing.Size(225, 180);
            this.gbAequitasNames.TabIndex = 3;
            this.gbAequitasNames.TabStop = false;
            this.gbAequitasNames.Text = "Predefined zipped content names";
            // 
            // tbAequitasName
            // 
            this.tbAequitasName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.tbAequitasName.Location = new System.Drawing.Point(7, 151);
            this.tbAequitasName.Name = "tbAequitasName";
            this.tbAequitasName.Size = new System.Drawing.Size(132, 20);
            this.tbAequitasName.TabIndex = 7;
            // 
            // bAequitasNameRemove
            // 
            this.bAequitasNameRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bAequitasNameRemove.Location = new System.Drawing.Point(145, 19);
            this.bAequitasNameRemove.Name = "bAequitasNameRemove";
            this.bAequitasNameRemove.Size = new System.Drawing.Size(75, 23);
            this.bAequitasNameRemove.TabIndex = 6;
            this.bAequitasNameRemove.Text = "Remove";
            this.bAequitasNameRemove.UseVisualStyleBackColor = true;
            this.bAequitasNameRemove.Click += new System.EventHandler(this.bDemoNameRemove_Click);
            // 
            // bAequitasNameAdd
            // 
            this.bAequitasNameAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.bAequitasNameAdd.Location = new System.Drawing.Point(145, 150);
            this.bAequitasNameAdd.Name = "bAequitasNameAdd";
            this.bAequitasNameAdd.Size = new System.Drawing.Size(75, 23);
            this.bAequitasNameAdd.TabIndex = 5;
            this.bAequitasNameAdd.Text = "Add";
            this.bAequitasNameAdd.UseVisualStyleBackColor = true;
            this.bAequitasNameAdd.Click += new System.EventHandler(this.bDemoNameAdd_Click);
            // 
            // lbAequitasNames
            // 
            this.lbAequitasNames.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lbAequitasNames.FormattingEnabled = true;
            this.lbAequitasNames.Location = new System.Drawing.Point(6, 19);
            this.lbAequitasNames.Name = "lbAequitasNames";
            this.lbAequitasNames.Size = new System.Drawing.Size(133, 108);
            this.lbAequitasNames.TabIndex = 0;
            // 
            // gbScreenshotNames
            // 
            this.gbScreenshotNames.Controls.Add(this.bScreenshotNameUp);
            this.gbScreenshotNames.Controls.Add(this.bScreenshotNameDown);
            this.gbScreenshotNames.Controls.Add(this.tbScreenshotNames);
            this.gbScreenshotNames.Controls.Add(this.bScreenshotNameRemove);
            this.gbScreenshotNames.Controls.Add(this.bScreenshotNameAdd);
            this.gbScreenshotNames.Controls.Add(this.lbScreenshotNames);
            this.gbScreenshotNames.Location = new System.Drawing.Point(238, 3);
            this.gbScreenshotNames.Name = "gbScreenshotNames";
            this.gbScreenshotNames.Size = new System.Drawing.Size(225, 180);
            this.gbScreenshotNames.TabIndex = 3;
            this.gbScreenshotNames.TabStop = false;
            this.gbScreenshotNames.Text = "Predefined screenshot names";
            // 
            // tbScreenshotNames
            // 
            this.tbScreenshotNames.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.tbScreenshotNames.Location = new System.Drawing.Point(6, 153);
            this.tbScreenshotNames.Name = "tbScreenshotNames";
            this.tbScreenshotNames.Size = new System.Drawing.Size(132, 20);
            this.tbScreenshotNames.TabIndex = 7;
            // 
            // bScreenshotNameRemove
            // 
            this.bScreenshotNameRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bScreenshotNameRemove.Location = new System.Drawing.Point(144, 20);
            this.bScreenshotNameRemove.Name = "bScreenshotNameRemove";
            this.bScreenshotNameRemove.Size = new System.Drawing.Size(75, 23);
            this.bScreenshotNameRemove.TabIndex = 6;
            this.bScreenshotNameRemove.Text = "Remove";
            this.bScreenshotNameRemove.UseVisualStyleBackColor = true;
            this.bScreenshotNameRemove.Click += new System.EventHandler(this.bDemoNameRemove_Click);
            // 
            // bScreenshotNameAdd
            // 
            this.bScreenshotNameAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.bScreenshotNameAdd.Location = new System.Drawing.Point(144, 152);
            this.bScreenshotNameAdd.Name = "bScreenshotNameAdd";
            this.bScreenshotNameAdd.Size = new System.Drawing.Size(75, 23);
            this.bScreenshotNameAdd.TabIndex = 5;
            this.bScreenshotNameAdd.Text = "Add";
            this.bScreenshotNameAdd.UseVisualStyleBackColor = true;
            this.bScreenshotNameAdd.Click += new System.EventHandler(this.bDemoNameAdd_Click);
            // 
            // lbScreenshotNames
            // 
            this.lbScreenshotNames.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lbScreenshotNames.FormattingEnabled = true;
            this.lbScreenshotNames.Location = new System.Drawing.Point(6, 19);
            this.lbScreenshotNames.Name = "lbScreenshotNames";
            this.lbScreenshotNames.Size = new System.Drawing.Size(133, 108);
            this.lbScreenshotNames.TabIndex = 0;
            // 
            // gbDemoNames
            // 
            this.gbDemoNames.Controls.Add(this.bReplayNameUp);
            this.gbDemoNames.Controls.Add(this.bReplayNameDown);
            this.gbDemoNames.Controls.Add(this.tbDemoNames);
            this.gbDemoNames.Controls.Add(this.bDemoNameRemove);
            this.gbDemoNames.Controls.Add(this.lbDemoNames);
            this.gbDemoNames.Controls.Add(this.bDemoNameAdd);
            this.gbDemoNames.Location = new System.Drawing.Point(7, 3);
            this.gbDemoNames.Name = "gbDemoNames";
            this.gbDemoNames.Size = new System.Drawing.Size(225, 180);
            this.gbDemoNames.TabIndex = 0;
            this.gbDemoNames.TabStop = false;
            this.gbDemoNames.Text = "Predefined replay names";
            // 
            // tbDemoNames
            // 
            this.tbDemoNames.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.tbDemoNames.Location = new System.Drawing.Point(6, 152);
            this.tbDemoNames.Name = "tbDemoNames";
            this.tbDemoNames.Size = new System.Drawing.Size(132, 20);
            this.tbDemoNames.TabIndex = 4;
            // 
            // bDemoNameRemove
            // 
            this.bDemoNameRemove.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bDemoNameRemove.Location = new System.Drawing.Point(144, 19);
            this.bDemoNameRemove.Name = "bDemoNameRemove";
            this.bDemoNameRemove.Size = new System.Drawing.Size(75, 23);
            this.bDemoNameRemove.TabIndex = 2;
            this.bDemoNameRemove.Text = "Remove";
            this.bDemoNameRemove.UseVisualStyleBackColor = true;
            this.bDemoNameRemove.Click += new System.EventHandler(this.bDemoNameRemove_Click);
            // 
            // lbDemoNames
            // 
            this.lbDemoNames.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.lbDemoNames.FormattingEnabled = true;
            this.lbDemoNames.Location = new System.Drawing.Point(6, 19);
            this.lbDemoNames.Name = "lbDemoNames";
            this.lbDemoNames.Size = new System.Drawing.Size(133, 108);
            this.lbDemoNames.TabIndex = 0;
            // 
            // bDemoNameAdd
            // 
            this.bDemoNameAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.bDemoNameAdd.Location = new System.Drawing.Point(144, 151);
            this.bDemoNameAdd.Name = "bDemoNameAdd";
            this.bDemoNameAdd.Size = new System.Drawing.Size(75, 23);
            this.bDemoNameAdd.TabIndex = 1;
            this.bDemoNameAdd.Text = "Add";
            this.bDemoNameAdd.UseVisualStyleBackColor = true;
            this.bDemoNameAdd.Click += new System.EventHandler(this.bDemoNameAdd_Click);
            // 
            // bCancel
            // 
            this.bCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.bCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.bCancel.Image = global::QuickLoad.Images.Delete_16;
            this.bCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bCancel.Location = new System.Drawing.Point(388, 421);
            this.bCancel.Name = "bCancel";
            this.bCancel.Size = new System.Drawing.Size(90, 23);
            this.bCancel.TabIndex = 6;
            this.bCancel.Text = "Cancel";
            this.bCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // bOK
            // 
            this.bOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.bOK.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.bOK.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bOK.Image = global::QuickLoad.Images.Save_16;
            this.bOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
            this.bOK.Location = new System.Drawing.Point(292, 421);
            this.bOK.Name = "bOK";
            this.bOK.Size = new System.Drawing.Size(90, 23);
            this.bOK.TabIndex = 4;
            this.bOK.Text = "OK";
            this.bOK.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
            // 
            // bAequitasNameDown
            // 
            this.bAequitasNameDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bAequitasNameDown.Location = new System.Drawing.Point(144, 104);
            this.bAequitasNameDown.Name = "bAequitasNameDown";
            this.bAequitasNameDown.Size = new System.Drawing.Size(75, 23);
            this.bAequitasNameDown.TabIndex = 8;
            this.bAequitasNameDown.Text = "Down";
            this.bAequitasNameDown.UseVisualStyleBackColor = true;
            this.bAequitasNameDown.Click += new System.EventHandler(this.bAequitasNameDown_Click);
            // 
            // bAequitasNameUp
            // 
            this.bAequitasNameUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bAequitasNameUp.Location = new System.Drawing.Point(144, 75);
            this.bAequitasNameUp.Name = "bAequitasNameUp";
            this.bAequitasNameUp.Size = new System.Drawing.Size(75, 23);
            this.bAequitasNameUp.TabIndex = 9;
            this.bAequitasNameUp.Text = "Up";
            this.bAequitasNameUp.UseVisualStyleBackColor = true;
            this.bAequitasNameUp.Click += new System.EventHandler(this.bAequitasNameUp_Click);
            // 
            // bReplayNameUp
            // 
            this.bReplayNameUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bReplayNameUp.Location = new System.Drawing.Point(144, 75);
            this.bReplayNameUp.Name = "bReplayNameUp";
            this.bReplayNameUp.Size = new System.Drawing.Size(75, 23);
            this.bReplayNameUp.TabIndex = 11;
            this.bReplayNameUp.Text = "Up";
            this.bReplayNameUp.UseVisualStyleBackColor = true;
            this.bReplayNameUp.Click += new System.EventHandler(this.bAequitasNameUp_Click);
            // 
            // bReplayNameDown
            // 
            this.bReplayNameDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bReplayNameDown.Location = new System.Drawing.Point(144, 104);
            this.bReplayNameDown.Name = "bReplayNameDown";
            this.bReplayNameDown.Size = new System.Drawing.Size(75, 23);
            this.bReplayNameDown.TabIndex = 10;
            this.bReplayNameDown.Text = "Down";
            this.bReplayNameDown.UseVisualStyleBackColor = true;
            this.bReplayNameDown.Click += new System.EventHandler(this.bAequitasNameDown_Click);
            // 
            // bScreenshotNameUp
            // 
            this.bScreenshotNameUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bScreenshotNameUp.Location = new System.Drawing.Point(144, 75);
            this.bScreenshotNameUp.Name = "bScreenshotNameUp";
            this.bScreenshotNameUp.Size = new System.Drawing.Size(75, 23);
            this.bScreenshotNameUp.TabIndex = 11;
            this.bScreenshotNameUp.Text = "Up";
            this.bScreenshotNameUp.UseVisualStyleBackColor = true;
            this.bScreenshotNameUp.Click += new System.EventHandler(this.bAequitasNameUp_Click);
            // 
            // bScreenshotNameDown
            // 
            this.bScreenshotNameDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
            this.bScreenshotNameDown.Location = new System.Drawing.Point(144, 104);
            this.bScreenshotNameDown.Name = "bScreenshotNameDown";
            this.bScreenshotNameDown.Size = new System.Drawing.Size(75, 23);
            this.bScreenshotNameDown.TabIndex = 10;
            this.bScreenshotNameDown.Text = "Down";
            this.bScreenshotNameDown.UseVisualStyleBackColor = true;
            this.bScreenshotNameDown.Click += new System.EventHandler(this.bAequitasNameDown_Click);
            // 
            // Settings
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(483, 447);
            this.Controls.Add(this.tabControl1);
            this.Controls.Add(this.bCancel);
            this.Controls.Add(this.bOK);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "Settings";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "Settings";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Settings_Closing);
            this.Load += new System.EventHandler(this.Settings_Load);
            this.gUploadSettings.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxPreloads)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxConnections)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.nUpMaxRetries)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ReplayCount)).EndInit();
            this.gRecentFiles.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.AequitasCount)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ScreenshotCount)).EndInit();
            this.grpMisc.ResumeLayout(false);
            this.grpMisc.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.nToolTipTimeout)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.RecentFilesHeight)).EndInit();
            this.gEnabledElements.ResumeLayout(false);
            this.tabControl1.ResumeLayout(false);
            this.tabApperance.ResumeLayout(false);
            this.tabFilesnFolders.ResumeLayout(false);
            this.tabUploading.ResumeLayout(false);
            this.tabAdditional.ResumeLayout(false);
            this.gAutoUpdate.ResumeLayout(false);
            this.gbAequitasNames.ResumeLayout(false);
            this.gbAequitasNames.PerformLayout();
            this.gbScreenshotNames.ResumeLayout(false);
            this.gbScreenshotNames.PerformLayout();
            this.gbDemoNames.ResumeLayout(false);
            this.gbDemoNames.PerformLayout();
            this.ResumeLayout(false);

		}
		#endregion

		private void Settings_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if (DialogResult == DialogResult.OK)
			{
				StoreSettings();
			}
		}

		private void StoreSettings()
		{
            QuickLoad.Properties.Settings.Default.ReplayCount = (int)ReplayCount.Value;
            QuickLoad.Properties.Settings.Default.ScreenshotCount = (int)ScreenshotCount.Value;
            QuickLoad.Properties.Settings.Default.AequitasCount = (int)AequitasCount.Value;
		    QuickLoad.Properties.Settings.Default.ToolTipTimeout = (int)nToolTipTimeout.Value;
            xp.ExpandedHeight = (int)RecentFilesHeight.Value;
            //QuickLoad.Properties.Settings.Default.ShowRecentFilesHint = cbShowRecentFilesHint.Checked;
		/*    if (cbShowRecentFilesHint.Checked)
                xp.ShowControl(parent.pRecentFilesHint);
		    else
		        xp.HideControl(parent.pRecentFilesHint);*/
		    QuickLoad.Properties.Settings.Default.DemoNames.Clear();
		    foreach (string s in lbDemoNames.Items)
		    {
                QuickLoad.Properties.Settings.Default.DemoNames.Add(s);
		    }
            QuickLoad.Properties.Settings.Default.AequitasNames.Clear();
            foreach (string s in lbAequitasNames.Items)
            {
                QuickLoad.Properties.Settings.Default.AequitasNames.Add(s);
            }
            QuickLoad.Properties.Settings.Default.ScreenshotNames.Clear();
            foreach (string s in lbScreenshotNames.Items)
            {
                QuickLoad.Properties.Settings.Default.ScreenshotNames.Add(s);
            }
            QuickLoad.Properties.Settings.Default.AutoCheckForUpdates = cbAutoUpdate.Checked;
		    QuickLoad.Properties.Settings.Default.UpMaxConnections = (int)nUpMaxConnections.Value;
		    QuickLoad.Properties.Settings.Default.UpMaxRetries = (int)nUpMaxRetries.Value;
		    QuickLoad.Properties.Settings.Default.UpMaxPreloads = (int)nUpMaxPreloads.Value;
            QuickLoad.Properties.Settings.Default.RecentFilesHeight = (int) RecentFilesHeight.Value;
		    QuickLoad.Properties.Settings.Default.watchedFolders.Clear();
            QuickLoad.Properties.Settings.Default.ShowSplash = cbShowSplash.Checked;
		    foreach (object o in lBoxFolders.Items)
		    {
                QuickLoad.Properties.Settings.Default.watchedFolders.Add((string)o);
		    }
            if (cbMenuBarEnabled.Checked)
            {
                QuickLoad.Properties.Settings.Default.ExpandosHidden.Clear();
                QuickLoad.Properties.Settings.Default.ExpandoItemsHidden.Clear();
                foreach (XPExplorerBar.Expando exp in tp.Expandos)
                {
                    foreach (TreeNode p in twEnabledItems.Nodes)
                    {
                        if ((string)p.Tag == exp.Name)
                        {
                            if (!p.Checked)
                                QuickLoad.Properties.Settings.Default.ExpandosHidden.Add(exp.Name);
                            foreach (Control c in exp.Items)
                            {
                                foreach (TreeNode child in p.Nodes)
                                {
                                    if ((string)child.Tag == c.Name)
                                    {
                                        if (!child.Checked)
                                        {
                                            QuickLoad.Properties.Settings.Default.ExpandoItemsHidden.Add(c.Name);
                                        }
                                    }
                                }
                                    
                            }
                        }
                    }
                        
                }
            }
            if (gEnabledElements.Enabled && twEnabledItems.Nodes.Count == 0)
            {
                QuickLoad.Properties.Settings.Default.ExpandosHidden.Clear();
                foreach (XPExplorerBar.Expando exp in tp.Expandos)
                {
                    exp.Visible = true;
                }
            }
            tp.Visible = QuickLoad.Properties.Settings.Default.MenuBarEnabled = cbMenuBarEnabled.Checked;
		    parent.RefreshSettings();
		    //tp.DoLayout();
		    //tp.PerformLayout();
            
		    //tp.SetAutoScrollMargin(10,10);
		    //tp.Update();
		}

		private void ReadSettings()
		{
		    lBoxFolders.Items.Clear();
            if (QuickLoad.Properties.Settings.Default.watchedFolders == null)
                QuickLoad.Properties.Settings.Default.watchedFolders =
                    new System.Collections.Specialized.StringCollection();
		    foreach (string folder in QuickLoad.Properties.Settings.Default.watchedFolders)
		    {
                lBoxFolders.Items.Add(folder);
		    }
            ReplayCount.Value = QuickLoad.Properties.Settings.Default.ReplayCount;
            ScreenshotCount.Value = QuickLoad.Properties.Settings.Default.ScreenshotCount;
            AequitasCount.Value = QuickLoad.Properties.Settings.Default.AequitasCount;
            RecentFilesHeight.Value = QuickLoad.Properties.Settings.Default.RecentFilesHeight;
            cbMenuBarEnabled.Checked = tp.Visible;
            cbAutoUpdate.Checked = QuickLoad.Properties.Settings.Default.AutoCheckForUpdates;
		    lbDemoNames.Items.Clear();
		    lbAequitasNames.Items.Clear();
		    lbScreenshotNames.Items.Clear();
            foreach (string s in QuickLoad.Properties.Settings.Default.DemoNames)
		    {
                lbDemoNames.Items.Add(s);
		    }
            foreach (string s in QuickLoad.Properties.Settings.Default.AequitasNames)
            {
                lbAequitasNames.Items.Add(s);
            }
            foreach (string s in QuickLoad.Properties.Settings.Default.ScreenshotNames)
            {
                lbScreenshotNames.Items.Add(s);
            }
            nUpMaxConnections.Value = QuickLoad.Properties.Settings.Default.UpMaxConnections;
            nUpMaxRetries.Value = QuickLoad.Properties.Settings.Default.UpMaxRetries;
            nUpMaxPreloads.Value = QuickLoad.Properties.Settings.Default.UpMaxPreloads;
		    cbShowSplash.Checked = QuickLoad.Properties.Settings.Default.ShowSplash;
            nToolTipTimeout.Value = QuickLoad.Properties.Settings.Default.ToolTipTimeout;
            if (cbMenuBarEnabled.Checked)
            {
                twEnabledItems.Nodes.Clear();
                foreach (XPExplorerBar.Expando exp in tp.Expandos)
                {
                    TreeNode node = twEnabledItems.Nodes.Add(exp.Text);
                    node.Tag = exp.Name;
                    node.Checked = exp.Visible;
                    foreach (Control c in exp.Items)
                    {
                        string text = c.Text;
                        if (c.Name == "tiRecentReplays")
                            text = lang.RecentFiles;
                        else if (c.Name == "pRecentFilesHint")
                            text = lang.Hint;
                        TreeNode childnode = node.Nodes.Add(text);
                        childnode.Tag = c.Name;
                        childnode.Checked = !exp.ControlHidden(c);
                    }
                }
                twEnabledItems.ExpandAll();
            }

		}

		private void container_SettingRead(object sender, System.EventArgs e)
		{
			ReadSettings();
		}

		private void Settings_Load(object sender, System.EventArgs e)
		{
            tabApperance.Text = lang.View;
            tabFilesnFolders.Text = lang.FilesFolders;
            tabUploading.Text = lang.UploadSettings;
            tabAdditional.Text = lang.AdditionalSettings;
            grpMisc.Text = lang.Miscellaneous;
            lRecentFilesHeight.Text = lang.HeightRecentFiles;
            lToolTipTimeout.Text = lang.ToolTipTo;
            cbMenuBarEnabled.Text = lang.ShowXPBar;
            cbShowSplash.Text = lang.ShowSplash;

            gAutoUpdate.Text = lang.AutoUpdateTitle;
            cbAutoUpdate.Text = lang.AutoUpdateEnable;
            bUpdateCheckNow.Text = lang.AutoUpdateCheckNow;
		    
            gEnabledElements.Text = lang.SidebarElements;
            bOK.Text = lang.OK;
            gRecentFiles.Text = lang.RecentFiles;
            lFolderDesc.Text = lang.ScanMatchmedia;
            bAddFolder.Text = lang.AddFolder;
            bRemoveFolder.Text = lang.RemoveFolder;
            lRepCount.Text = lang.NumberOfShownReplays;
            lScreenCount.Text = lang.NumberOfShownScreenshots;
            lAeqCount.Text = lang.NumberOfShownAequitasFiles;
            bAutoScan.Text = lang.AutoScanMatchmedia;
            lChangesHint.Text = lang.ChangesEffect1;
            lMaxConnections.Text = lang.NumberFTPConnections;
            lMaxRetries.Text = lang.NumberRetry;
            lMaxPreloads.Text = lang.NumberCompressions;
            lChangesHint2.Text = lang.ChangesEffect2;
            gbDemoNames.Text = lang.PredefinedReplay;
            gbScreenshotNames.Text = lang.PredefinedScreenshot;
            gbAequitasNames.Text = lang.PredefinedZip;
            bDemoNameAdd.Text = lang.Add;
            bDemoNameRemove.Text = lang.Remove;
            bScreenshotNameAdd.Text = lang.Add;
            bScreenshotNameRemove.Text = lang.Remove;
            bAequitasNameAdd.Text = lang.Add;
            bAequitasNameRemove.Text = lang.Remove;

            bAequitasNameUp.Text = lang.Up;
            bAequitasNameDown.Text = lang.Down;

            bReplayNameUp.Text = lang.Up;
            bReplayNameDown.Text = lang.Down;

            bScreenshotNameUp.Text = lang.Up;
            bScreenshotNameDown.Text = lang.Down;
            ReadSettings();
		}

        private void bAddFolder_Click(object sender, EventArgs e)
        {
            if(fBrowser.ShowDialog(this) == DialogResult.OK)
            {
                lBoxFolders.Items.Add(fBrowser.SelectedPath);
                QuickLoad.Properties.Settings.Default.watchedFolders.Add(fBrowser.SelectedPath);
            }
            
        }

        private void bRemoveFolder_Click(object sender, EventArgs e)
        {
            while (lBoxFolders.SelectedItems.Count > 0)
            {
                lBoxFolders.Items.RemoveAt(lBoxFolders.SelectedIndices[0]);
            }
        }

        private void cbMenuBarEnabled_CheckedChanged(object sender, EventArgs e)
        {
            twEnabledItems.Enabled = cbMenuBarEnabled.Checked;
        }

        private void bDemoNameAdd_Click(object sender, EventArgs e)
        {
            Button b = (Button) sender;
            ListBox lb = null;
            TextBox tb = null;
            if (b.Parent.Name == "gbDemoNames")
            {
                lb = lbDemoNames;
                tb = tbDemoNames;
            }
            else if (b.Parent.Name == "gbScreenshotNames")
            {
                lb = lbScreenshotNames;
                tb = tbScreenshotNames;
            }
            else if (b.Parent.Name == "gbAequitasNames")
            {
                lb = lbAequitasNames;
                tb = tbAequitasName;
            }
            else
                return;
            if(tb.Text != string.Empty)
            {
                lb.Items.Add(tb.Text);
                tb.Text = string.Empty;
                tb.Focus();
            }
                
        }

        private void bDemoNameRemove_Click(object sender, EventArgs e)
        {
            Button b = (Button)sender;
            ListBox lb = null;
            if (b.Parent.Name == "gbDemoNames")
            {
                lb = lbDemoNames;
            }
            else if (b.Parent.Name == "gbScreenshotNames")
            {
                lb = lbScreenshotNames;
            }
            else if (b.Parent.Name == "gbAequitasNames")
            {
                lb = lbAequitasNames;
            }
            else
                return;
            while (lb.SelectedItems.Count > 0)
            {
                lb.Items.Remove(lb.SelectedItems[0]);
            }
            //if(lb.I)
        }

        private void bUpdateCheckNow_Click(object sender, EventArgs e)
        {
            parent.upd.UpdateCheckComplete += new AutoUpdater.AutoUpdateChecker.UpdateCheckCompleteEventHandler(upd_UpdateCheckComplete);
            parent.upd.hasUpdateAsync(QuickLoad.Properties.Settings.Default.AutoUpdateURL,
                          new Version(Application.ProductVersion), new AutoUpdater.UsageInfo(QuickLoad.Properties.Settings.Default.PseudoUniqueID, Application.ProductVersion));
        }

        void upd_UpdateCheckComplete(AutoUpdater.AutoUpdateChecker sender, AutoUpdater.UpdateCheckEventArgs e)
        {
            if (e.hasUpdate)
            {
                if (MessageBox.Show(QuickLoad.lang.UpdateAvailable, QuickLoad.lang.UpdateAvailableTitle, MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    FormUpdate fupd = new FormUpdate(sender);
                    fupd.ShowDialog(this);
                }
            }
            else
            {
                MessageBox.Show(lang.GotRecentVersion);
            }
            QuickLoad.Properties.Settings.Default.LastUpdateCheck = DateTime.Now;
        }

        private void bAequitasNameUp_Click(object sender, EventArgs e)
        {
            Button b = (Button)sender;
            ListBox lb = null;
            if (b.Parent.Name == "gbDemoNames")
            {
                lb = lbDemoNames;
            }
            else if (b.Parent.Name == "gbScreenshotNames")
            {
                lb = lbScreenshotNames;
            }
            else if (b.Parent.Name == "gbAequitasNames")
            {
                lb = lbAequitasNames;
            }
            else
                return;
            if (lb.SelectedItems.Count == 1 && lb.Items.IndexOf(lb.SelectedItems[0]) > 0)
            {
                int oldindex = lb.Items.IndexOf(lb.SelectedItems[0]);
                lb.Items.Insert(oldindex - 1, lb.SelectedItems[0]);
                lb.Items.RemoveAt(oldindex + 1);
                lb.SelectedItem = lb.Items[oldindex - 1];
            }
        }

        private void bAequitasNameDown_Click(object sender, EventArgs e)
        {
            Button b = (Button)sender;
            ListBox lb = null;
            if (b.Parent.Name == "gbDemoNames")
            {
                lb = lbDemoNames;
            }
            else if (b.Parent.Name == "gbScreenshotNames")
            {
                lb = lbScreenshotNames;
            }
            else if (b.Parent.Name == "gbAequitasNames")
            {
                lb = lbAequitasNames;
            }
            else
                return;
            if (lb.SelectedItems.Count == 1 && lb.Items.IndexOf(lb.SelectedItems[0]) < lb.Items.Count-1)
            {
                int oldindex = lb.Items.IndexOf(lb.SelectedItems[0]);
                lb.Items.Insert(oldindex + 2, lb.SelectedItems[0]);
                lb.Items.RemoveAt(oldindex);
                lb.SelectedItem = lb.Items[oldindex+1];
            }
        }

	}
}
